<div class="estadisticas">
<h2><?php echo $titulo;?></h2>
<table cellpadding="0" cellspacing="0">
<tr>
        <th><?php echo 'Username';?></th>
        <th><?php echo 'Nombre';?></th>
        <th><?php echo 'Apellido';?></th>
	<th><?php echo 'Puntos';?></th>
        <th><?php echo $columna;  ?></th>
	<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
//print_r($users);
foreach ($users as $user):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $user['User']['username']; ?>
		</td>
		<td>
			<?php echo $user['User']['nombre']; ?>
		</td>
		<td>
			<?php echo $user['User']['apellido']; ?>
		</td>
		<td>
			<?php echo $user['User']['puntos']; ?>
		</td>
                <td>
			<?php
                        if($tipo==1){
                            echo $user['User']['partidosjugados'];
                        }elseif($tipo==2){
                            echo $user['User']['partidosjugados'];
                        }elseif($tipo==3){
                            echo $user['User']['partidosganados'];
                        }elseif($tipo==4){
                            echo $user['User']['partidosempatados'];
                        }elseif($tipo==5){
                            echo $user['User']['aux'];
                        }elseif($tipo==11){
                            echo $user['User']['golesfavor'];
                        }elseif($tipo==12){
                            echo $user['User']['golesencontra'];
                        }elseif($tipo==13){
                            echo $user['User']['golesfavor'];
                        }elseif($tipo==14){
                            echo $user['User']['golesencontra'];
                        }
			?>
		</td>
		<td class="actions">
			<?php echo $html->link(__('Estadistica Personal', true), array('action'=>'estadisticas', $user['User']['user'])); ?>
			<?php //echo $html->link(__('Modificar', true), array('action'=>'modificarUser', $user['User']['user'])); ?>
			<?php //echo $html->link(__('Eliminar', true), array('action'=>'delete', $user['User']['user']), null, sprintf(__('Esta seguro que desea eliminar el usuario: # %s?', true), $user['User']['username'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
</div>

